<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To delete a folder from a user based location via computer based deployment # Configuration Type - COMPUTER # Note: Update the destination path in the destination path and file name to be hardcoded in the script. #> $name = ((Get-WMIObject -ClassName Win32_ComputerSystem).Username).split('\')[1] # User Based Folder Path Needs to be hardcoded here after the $name $sourceFolder = "C:\Users\$name\AppData\Local\Cisco\Unified Communications\Jabber\CSF\contacts" # Check if the source folder exists if (Test-Path $sourceFolder) { # Delete the source folder Remove-Item -Path $sourceFolder -Recurse -Force Write-Host "Source folder deleted successfully!" } else { Write-Host "Source folder not found!" }